from django.db import models


# Create your models here.
class Department(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=50)
    leader = models.ForeignKey('custom_user.CustomUser',
                               on_delete=models.CASCADE)

    class Meta:
        verbose_name = '部门'
        verbose_name_plural = '部门列表'

    def __str__(self):
        return self.name
